function spike_params()
%
% plot various spike parameters for the selected population
%

global CONTROL % all the information is in the control worksheet

sf = getmainselection;
if(sf <= 0)
   return;
end;

pflag = getplotflag;
% use the comparison plot figure
hf = findobj('Tag', 'Comparison');
if(isempty(hf))
   hf = figure('Tag', 'Comparison', 'Name', 'Comparison Plots', 'NumberTitle', 'off');
end;
figure(hf);

clf;
QueMessage('Spike Parameters', 1); % clear the que
%extract info in a general way...
dvmax=[];
dvmin=[];
hwa=[];
hwb=[];
for i = 1:length(sf)
   dvmax(i) = CONTROL(sf(i)).spike.dvmax;
   dvmin(i) = CONTROL(sf(i)).spike.dvmin;
   hwa(i) = CONTROL(sf(i)).spike.hwa;
   hwb(i) = CONTROL(sf(i)).spike.hwb;
end;
subplot(2,3,1);
hist(dvmax, 15);

subplot(2,3,2);
hist(dvmin, 15);

subplot(2,3,3);
hist(hwa, 15);

subplot(2,3,4);
hist(hwb, 15);

subplot(2,3,5);
plot(dvmax, hwa, 'ro', 'markersize', 2);

subplot(2,3,6);
plot(dvmax, dvmin, 'ko', 'markersize', 2);

